# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

platform :ios do
    desc "打包上传到蒲公英"
    sh './build.sh "$FSVINFOPLIST"'
    
    lane :beta do
    build_app(
	
            export_options: {
             method: "ad-hoc",
             provisioningProfiles: {
                  "com.thyc.LeasingPlatform" => "platform_Hoc"

                }

            },
            clean:true, #打包前clean项目
            configuration:"Debug",
            output_directory:"~/Desktop/APP",
            workspace: ENV['FSVWORKSPACE'],
            scheme: ENV['FSVSCHEME']
            
            )

    pgyer(
        api_key: ENV['FSVPGYER_API_KEY'],
        user_key: ENV['FSVPGYER_USER_KEY'],
        update_description: ENV['FSVDESCRIPTION'],
        password: ENV['FSVPGYER_PASSWORD'],
        )

    # 钉钉发出提醒
       sh "./dingding.sh"

   end
   
   
   
   lane :release do
     capture_screenshots
     build_app
     upload_to_app_store       # Upload the screenshots and the binary to iTunes

   end
   
   

end
